package com.light.gulimall.product.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.light.common.utils.PageUtils;
import com.light.gulimall.product.dto.AttrDTO;
import com.light.gulimall.product.entity.AttrAttrgroupRelationEntity;

import java.util.List;
import java.util.Map;

/**
 * 属性&属性分组关联
 *
 * @author minmin
 * @email 980680541@gmail.com
 * @date 2024-07-15 21:42:34
 */
public interface AttrAttrgroupRelationService extends IService<AttrAttrgroupRelationEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 添加属性与分组关联关系
     * @param dto [{
     *   "attrGroupId": 0, //分组id
     *   "attrId": 0, //属性id
     * }]
     */
    void saveRelation(List<AttrDTO> dto);

    /**
     * 删除属性与分组的关联关系
     * @param dto   [{"attrId":1,"attrGroupId":2}]
     */
    void deleteRelation(List<AttrDTO> dto);
}

